package com.lanou.utils;

import com.lanou.bean.BrandSellPage;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 王远航
 * Created by dllo on 18/3/12.
 */
public class MsgResult {

    /**
     * 代表验证成功
     * @return
     */
    public  static AjaxResult msgSuccess(Object object){
        AjaxResult ajaxResult = new AjaxResult();
        ajaxResult.setCode("1");
        ajaxResult.setMsg("验证成功");
        ajaxResult.setData(object);
        return ajaxResult;
    }
    /**
     * 代表验证失败
     * @return
     */
    public  static  AjaxResult msgFalse(){
        AjaxResult ajaxResult = new AjaxResult();
        ajaxResult.setCode("0");
        ajaxResult.setMsg("验证失败");
        return ajaxResult;
    }

 public  static  AjaxResult brandSell(){
     List<BrandSellPage> brandSellPageList = new ArrayList<>();
     BrandSellPage brandSellPageone = new BrandSellPage("http://pic.to8to.com/hot/594_8741.jpg?t=1519639636",400,2000);
     BrandSellPage brandSellPagetwo = new BrandSellPage("http://pic.to8to.com/hot/594_8687.jpg?t=1519639636",400,2000);
     brandSellPageList.add(brandSellPageone);
     brandSellPageList.add(brandSellPagetwo);
     AjaxResult ajaxResult = new AjaxResult();
     ajaxResult.setCode("1");
     ajaxResult.setMsg("请求成功");
     ajaxResult.setData(brandSellPageList);
     return ajaxResult;
 }


}
